package com.uflower.product.dao;

import com.uflower.product.entity.SkuInfoEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

/**
 * sku信息
 * 
 * @author bridge
 * @email bridgezrq@163.com
 * @date 2022-01-15 14:52:35
 */
@Mapper
public interface SkuInfoDao extends BaseMapper<SkuInfoEntity> {

    BigDecimal getPriceBySkuId(@Param("skuId") Long skuId);

    List<SkuInfoEntity> getSkusStock(@Param("skuIds") List<Long> skuIds);

    void unlockStock(@Param("skuId") Long skuId,@Param("num")  Integer num);
}
